<?php
class Controller implements ControllerInterface {
	
	function __construct(){
		
	}
	
	function __destruct(){
		
	}
	
	public function main(){
		
	}
	
	
	/**
	 * Load view
	 */
	protected function view($viewname, $params=null) {
			
		$layout = new Layout();	
		
		$viewname = strtolower(trim($viewname));
		
		$layout->loadView($viewname, $params);
		
		exit();
	}	
	
	
	/**
	 * Load model
	 */
	protected function model($modelname, $params=null) {
			
		$modelname = strtolower(trim($modelname));
		
		if(is_array($params) && count($params) > 0){
			extract($params, EXTR_PREFIX_ALL, $viewname);
		}
		
		require_once('../view/'.ucwords($modelname).'Model.php');
		
		exit();
	}
	
	
}
?>